import http from "@/utils/request"
export default {
  getProductTypePage(data){
    return http.get('/admin/product/type/page', {params: data})
  },
  createProductType(data){
    return http.post('/admin/product/type',  data)
  },
  editProductType(data){
    return http.put('/admin/product/type',data)
  },
  getTypeList() {
    return http.get('/product/type')
  },

  /**
   * 删除分类
   * @param id
   * @returns {Promise<axios.AxiosResponse<any>>}
   */
  deleteType(id) {
    return http.delete(`/admin/product/type/delete/${id}`)
  },
}
